<ui:composition template="/WEB-INF/template.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <ui:define name="head">
        <title>System Message</title>
        <f:metadata>
            <f:viewParam name="msgCode" value="#{logBean.messageCode}" />
            <f:viewParam name="userList" value="#{logBean.usernames}" />
            <f:viewAction action="#{logBean.loadMessage()}" />
        </f:metadata>
    </ui:define>
    <ui:define name="content">
        <h1>System Message</h1>
        <p:outputPanel rendered="#{logBean.noInvitationSucceded}">
            <p:outputLabel value="#{logBean.noInvitationSuccededMessage}" />
        </p:outputPanel>
        <p:outputPanel rendered="#{logBean.someInvitationSucceded}">
            <p:outputLabel value="#{logBean.someInvitationSuccededMessage}" />
            <p:dataScroller value="#{logBean.userList}" var="username" chunkSize="20">
                <p:outputLabel value="#{username}" />
            </p:dataScroller>
        </p:outputPanel>
        <p:outputPanel rendered="#{logBean.everyInvitationSucceded}">
            <p:outputLabel value="#{logBean.everyInvitationSuccededMessage}" />
        </p:outputPanel>
        <p:outputPanel rendered="#{logBean.eventPostponed}">
            <p:outputLabel value="#{logBean.eventPostponedMessage}" />
        </p:outputPanel>
        <p:outputPanel rendered="#{logBean.invitationAccepted}">
            <p:outputLabel value="#{logBean.invitationAcceptedMessage}" />
        </p:outputPanel>
        <p:outputPanel rendered="#{logBean.invitationRefused}">
            <p:outputLabel value="#{logBean.invitationRefusedMessage}" />
        </p:outputPanel>
        <p:outputPanel rendered="#{logBean.participationCancelled}">
            <p:outputLabel value="#{logBean.participationCancelledMessage}" />
        </p:outputPanel>
        <h:link value="Continue" outcome="home?faces-redirect=true" />
    </ui:define>
</ui:composition>